<!--
 * @Author: wei wei.liu@zontal.io
 * @Date: 2022-12-28 14:51:17
 * @LastEditors: wei wei.liu@zontal.io
 * @LastEditTime: 2022-12-28 15:00:36
 * @FilePath: \reduxc:\work\asyc\tests.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const p = new Promise((resolve, reject) => {
        setTimeout(() => {
          reject(33);
        }, 1000);
      });
      async function demo() {
        try {
          let res = await p;
          console.log("res", res);
        } catch (error) {
          console.log("error", error);
        }
      }
      demo();
    </script>
  </body>
</html>
